﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZoomEngine.Animation
{
    public class Timer : Clock
    {
        public Timer(ClockManager manager) :
            base(manager)
        { 
        }

        protected override void OnBegin()
        {
            if (Begin != null)
            {
                Begin(this, EventArgs.Empty);
            }

            base.OnBegin();
        }

        protected override void OnCompleted()
        {
            if (Complete != null)
            {
                Complete(this, EventArgs.Empty);
            }

            base.OnCompleted();
        }

        protected override void OnLooped()
        {
            if (Looped != null)
            {
                Looped(this, EventArgs.Empty);
            }

            base.OnLooped();
        }

        public event EventHandler Begin;
        public event EventHandler Complete;
        public event EventHandler Looped;
    }
}
